<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/mobile/include/taglib.jsp"%>
<html>
<head>
	<title>小店公告</title>
	<%@include file="/WEB-INF/views/mobile/include/head.jsp" %>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element.parent());
					}
				}
			});
		});
	</script>
</head>
<body data-role="page">
	<div data-role="header" class="ui-header" data-position="fixed" data-tap-toggle="false">
		<div data-role="controlgroup" data-type="horizontal" class="ui-btn-left">
			<a href="${ctx }/ivm/merchant/set"><img class="head-back-icon" src="${ctxFront}/images/head/android/back.png"/></a>
	    </div>
	    <h1>小店公告</h1>
	    <div data-role="controlgroup" data-type="horizontal" class="ui-mini ui-btn-right">
	        <shiro:hasPermission name="ivm:activity:poster:edit">
	        <a href="javascript:" onclick="$('#inputForm').submit()" class="float-right"><img class="head-save-icon" src="${ctxFront}/images/head/android/save.png"/></a>
	    	</shiro:hasPermission>
	    </div>
	</div>
	<div role="main" class="ui-content">
		<form:form id="inputForm" modelAttribute="activityPoster" action="${ctx}/ivm/activity/poster/save" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<form:hidden path="merchant.id"/>
			<tags:mbmessage content="${message}"/>
			<div data-role="fieldcontain">
		          <label for="name">小店公告:</label>
					<form:textarea path="name" htmlEscape="false" class="input-xxlarge required"/>
			</div>
		</form:form>
	</div>
	<%@include file="/WEB-INF/views/mobile/layouts/menu.jsp" %>
</body>
</html>
